<template>
  <!-- 拒绝通过审核 -->
  <div>
    <div class="jcMassage massage pageViewBox">
      <!-- <div class="titleTop">拒绝通过审核</div> -->
      <div class="checkAll">
        <!-- 酒店资料 -->
        <div class="differentType rjc">
          <div class="title">酒店资料</div>
          <div class="checkText">
            <t-checkbox-group v-model="checkList.checkListData">
              <t-row>
                <div class="Massage" v-for="(item, i) in checkListData" :key="i">
                  <t-col :span="item.span">
                    <t-checkbox :label="item.name" :value="item.name"></t-checkbox>
                  </t-col>
                </div>
              </t-row>
            </t-checkbox-group>
          </div>
        </div>
        <!-- 营业执照 -->
        <div class="differentType rjc">
          <div class="title">营业执照</div>
          <!-- 营业执照选择框 -->
          <div class="checkText">
            <t-checkbox-group v-model="checkList.liceseData">
              <t-row>
                <div class="Massage" v-for="(item, i) in liceseData" :key="i">
                  <t-col :span="item.span">
                    <t-checkbox :label="item.name" :value="item.name"></t-checkbox>
                  </t-col>
                </div>
              </t-row>
            </t-checkbox-group>
          </div>
        </div>
        <!-- 补充资质 -->
        <div class="differentType rjc">
          <div class="title">补充资质</div>
          <!-- 补充资质选择框 -->
          <div class="checkText">
            <t-checkbox-group v-model="checkList.qulificationData">
              <t-row>
                <div class="Massage" v-for="(item, i) in qulificationData" :key="i">
                  <t-col :span="item.span">
                    <t-checkbox :label="item.name" :value="item.name"></t-checkbox>
                  </t-col>
                </div>
              </t-row>
            </t-checkbox-group>
          </div>
        </div>
        <!-- 签约资质 -->
        <div class="differentType rjc">
          <div class="title">签约资质</div>
          <!--签约资质选择框 -->
          <div class="checkText">
            <t-row>
              <!-- 个人签约资质 -->
              <t-checkbox-group v-model="checkList.aptitudeData" v-if="aptitude == 1">
                <div class="Massage" v-for="(item, i) in aptitudeData" :key="i">
                  <t-col :span="item.span">
                    <t-checkbox :label="item.name" :value="item.name"></t-checkbox>
                  </t-col>
                </div>
              </t-checkbox-group>
              <!-- 公司/法人签约 不一致 -->
              <t-checkbox-group v-model="checkList.aptitudeDataCommonNo" v-if="aptitude == 2 && same == 2">
                <div class="Massage" v-for="(item, i) in aptitudeDataCommonNo" :key="i">
                  <t-col :span="item.span">
                    <t-checkbox :label="item.name" :value="item.name"></t-checkbox>
                  </t-col>
                </div>
              </t-checkbox-group>
              <!-- 一致 -->
              <t-checkbox-group v-model="checkList.aptitudeDataCommon" v-if="aptitude == 2">
                <div class="Massage" v-for="(item, i) in aptitudeDataCommon" :key="i">
                  <t-col :span="item.span">
                    <t-checkbox :label="item.name" :value="item.name"></t-checkbox>
                  </t-col>
                </div>
              </t-checkbox-group>
              <!-- 公司法人授权签约 -->
              <div class="sqAutitude">
                <t-checkbox-group v-model="checkList.aptitudeSqDataCommonNo" v-if="aptitude == 3 && same == 2">
                  <div class="Massage" v-for="(item, i) in aptitudeSqDataCommonNo" :key="i">
                    <t-col :span="item.span">
                      <t-checkbox :label="item.name" :value="item.name"></t-checkbox>
                    </t-col>
                  </div>
                </t-checkbox-group>
                <t-checkbox-group v-model="checkList.aptitudeSqDataCommon" v-if="aptitude == 3">
                <div class="Massage" v-for="(item, i) in aptitudeSqDataCommon" :key="i">
                  <t-col :span="item.span">
                    <t-checkbox :label="item.name" :value="item.name"></t-checkbox>
                  </t-col>
                </div>
              </t-checkbox-group>
              </div>
              
            </t-row>
          </div>
        </div>
        <!-- 结算信息 -->
        <div class="differentType rjc">
          <div class="title">结算信息</div>
          <!--结算信息选择框 -->
          <div class="checkText">
            <!-- 法人，授权对公 -->
            <t-checkbox-group v-model="checkList.settltData" v-if="mony == 2">
              <t-row>
                <div class="Massage" v-for="(item, i) in settltData" :key="i">
                  <t-col :span="item.span">
                    <t-checkbox :label="item.name" :value="item.name"></t-checkbox>
                  </t-col>
                </div>
              </t-row>
            </t-checkbox-group>
            <!-- 法人对私 -->
            <t-checkbox-group v-model="checkList.settltSiData" v-if="mony == 1">
              <t-row>
                <div class="Massage" v-for="(item, i) in settltSiData" :key="i">
                  <t-col :span="item.span">
                    <t-checkbox :label="item.name" :value="item.name"></t-checkbox>
                  </t-col>
                </div>
              </t-row>
            </t-checkbox-group>
            <!--个人，授权对私 -->
            <t-checkbox-group v-model="checkList.settltPersonSiData" v-if="mony == 3">
              <t-row>
                <div class="Massage" v-for="(item, i) in settltPersonSiData" :key="i">
                  <t-col :span="item.span">
                    <t-checkbox :label="item.name" :value="item.name"></t-checkbox>
                  </t-col>
                </div>
              </t-row>
            </t-checkbox-group>
          </div>
        </div>

        <!-- 补充描述 -->
        <div class="differentType rjc">
          <div class="title">补充描述</div>
          <div class="checkText">
            <t-input :rows="6" placeholder="请输入内容" v-model="inputText"> </t-input>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: ['personData'],
  data() {
    return {
      aptitude: '', //签约方式控制
      same: '', //判断是否一致
      mony: '', //结算类型
      // 定义proprs里面的值
      myData: this.personData,
      // 补充描述的文本框高度
      inputText: '',
      checkList: {
        checkListData: [],
        liceseData: [],
        qulificationData: [],
        aptitudeData: [],
        aptitudeDataCommon: [],
        aptitudeDataCommonNo: [],
        aptitudeSqDataCommon: [],
        aptitudeSqDataCommonNo: [],
        settltData: [],
        settltSiData: [],
        settltPersonSiData:[]
      },
      // 酒店资料√
      checkListData: [
        { name: '酒店位置区域', value: 1, span: 8 },
        { name: '酒店名称', value: 2, span: 8 },
        { name: '酒店前台电话', value: 3, span: 8 },
        { name: '酒店客房总数', value: 4, span: 8 },
        { name: '酒店星级', value: 5, span: 8 },
        { name: '酒店营业状态', value: 7, span: 8 },
        { name: '酒店门头图片', value: 6, span: 8 },
        { name: '酒店大厅照', value: 7, span: 8 },
      ],
      // 营业执照√
      liceseData: [
        { name: '营业执照照片', value: 1, span: 8 },
        { name: '营业执照名称', value: 2, span: 8 },
        { name: '营业执照编号', value: 3, span: 8 },
        { name: '营业执照有效期', value: 4, span: 8 },
      ],
      // 补充资质√
      qulificationData: [
        { name: '特种行业资格证', value: 4, span: 8 },
        { name: '消防证', value: 5, span: 8 },
        { name: '食品经营许可证', value: 6, span: 8 },
        { name: '卫生许可证', value: 6, span: 8 },

      ],
      //签约资质
      // 个人签约资质√
      aptitudeData: [
        { name: '签约人证件照', value: 1, span: 8 },
        { name: '签约人姓名', value: 2, span: 8 },
        { name: '签约人证件号', value: 3, span: 8 },
        { name: '签约人证件有效期', value: 4, span: 8 },
        { name: '签约人手机号', value: 5, span: 8 },
        { name: '签约人邮箱', value: 6, span: 8 },
      ],
      // 公司/法人签约签约资质 -一致√2
      aptitudeDataCommon: [
        { name: '签约法人证件照', value: 1, span: 8 },
        { name: '签约法人证件名称', value: 2, span: 8 },
        { name: '签约法人证件号', value: 3, span: 8 },
        { name: '签约法人证件有效期', value: 4, span: 8 },
        { name: '签约法人手机号', value: 5, span: 8 },
        { name: '签约人法人邮箱', value: 6, span: 8 },
      ],
      // 公司/法人签约签约资质 -不一致√
      aptitudeDataCommonNo: [
        { name: '签约营业执照照片', value: 1, span: 8 },
        { name: '签约营业执照名称', value: 2, span: 8 },
        { name: '签约营业执照编号', value: 3, span: 8 },
        { name: '签约营业执照有效期', value: 4, span: 8 },
        { name: '签约法人证件照', value: 5, span: 8 },
        { name: '签约法人姓名', value: 6, span: 8 },
        { name: '签约法人证件号', value: 6, span: 8 },
        { name: '签约法人证件有效期', value: 6, span: 8 },
        { name: '签约手机号', value: 6, span: 8 },
        { name: '签约邮箱', value: 6, span: 8 },

      ],
      // 公司法人授权签约资质 一致√
      aptitudeSqDataCommon: [
        { name: '签约营业执照照片', value: 1, span: 8 },
        { name: '签约营业执照名称', value: 2, span: 8 },
        { name: '签约营业执照编号', value: 3, span: 8 },
        { name: '签约营业执照有效期', value: 4, span: 8 },
        { name: '签约法人证件照', value: 5, span: 8 },
        { name: '签约法人姓名', value: 6, span: 8 },
        { name: '签约法人证件号', value: 7, span: 8 },
        { name: '签约法人证件有效期', value: 8, span: 8 },
        { name: '授权签约人证件照片', value: 9, span: 8 },
        { name: '授权签约人姓名', value: 10, span: 8 },
        { name: '授权签约人证件号', value: 11, span: 8 },
        { name: '授权签约证件有效期', value: 12, span: 8 },
        { name: '签约手机号', value: 13, span: 8 },
        { name: '签约邮箱', value: 14, span: 8 },


      ],
      // 公司法人授权签约资质-不一致√
      aptitudeSqDataCommonNo: [
        { name: '委托书照片', value: 1, span: 8 },
        { name: '签约营业执照照片', value: 2, span: 8 },
        { name: '签约营业执照名称', value: 3, span: 8 },
        { name: '签约营业执照编号', value: 4, span: 8 },
        { name: '签约营业执照有效期', value: 5, span: 8 },
        { name: '签约法人证件照', value: 6, span: 8 },
        { name: '签约法人姓名', value: 7, span: 8 },
        { name: '签约法人证件号', value: 8, span: 8 },
        { name: '签约法人证件有效期', value: 9, span: 8 },
        { name: '授权签约人证件照', value: 10, span: 8 },
        { name: '授权签约人姓名', value: 11, span: 8 },
        { name: '授权签约证件号', value: 12, span: 8 },
        { name: '授权签约证件有效期', value: 13, span: 8 },
        { name: '授权签约法人证件照', value: 14, span: 8 },
        { name: '授权签约人姓名', value: 15, span: 8 },
        { name: '授权签约人证件号', value: 16, span: 8 },
        { name: '授权签约人证件有效期', value: 17, span: 8 },
        { name: '授权签约人手机号', value: 18, span: 8 },
        { name: '授权签约人邮箱', value: 19, span: 8 },


      ],

      // 结算信息--对公账户√
      settltData: [
        { name: '银行卡照片', value: 1, span: 8 },
        { name: '银行开户名', value: 2, span: 8 },
        { name: '开户所在省', value: 3, span: 8 },
        { name: '开户行所在市', value: 4, span: 8 },
        { name: '开户银行', value: 5, span: 8 },
        { name: '开户行支行', value: 6, span: 8 },
        { name: '银行卡号', value: 7, span: 8 },
        { name: '开户营业执照照片', value: 8, span: 8 },
        { name: '开户营业执照编号', value: 9, span: 8 },
        { name: '开户营业执照有效期', value: 10, span: 8 },
        { name: '开户营业执照法人姓名', value: 11, span: 8 },
        { name: '开户营业执照法人证件号', value: 12, span: 8 },
        { name: '财务联系人邮箱', value: 15, span: 8 },
        { name: '财务联系人姓名', value: 13, span: 8 },
        { name: '财务联系人手机号', value: 14, span: 8 },
      ],
      // 结算信息--（法人）对私账户√
      settltSiData: [
        { name: '银行卡照片', value: 1, span: 8 },
        { name: '银行开户名', value: 2, span: 8 },
        { name: '开户所在省', value: 3, span: 8 },
        { name: '开户行所在市', value: 4, span: 8 },
        { name: '开户银行', value: 5, span: 8 },
        { name: '开户行支行', value: 6, span: 8 },
        { name: '银行卡号', value: 7, span: 8 },
        { name: '法人证件照片', value: 8, span: 8 },
        { name: '开户用证件号', value: 9, span: 8 },
        { name: '法人证件有效期', value: 10, span: 8 },
        { name: '开户用预留手机号', value: 11, span: 8 },
        { name: '财务联系人邮箱', value: 14, span: 8 },
        { name: '财务联系人姓名', value: 12, span: 8 },
        { name: '财务联系人手机号', value: 13, span: 8 },
      ],
      // 结算信息--（个人,授权）对私账户√
       settltPersonSiData: [
        { name: '银行卡照片', value: 1, span: 8 },
        { name: '银行开户名', value: 2, span: 8 },
        { name: '开户所在省', value: 3, span: 8 },
        { name: '开户行所在市', value: 4, span: 8 },
        { name: '开户银行', value: 5, span: 8 },
        { name: '开户行支行', value: 6, span: 8 },
        { name: '银行卡号', value: 7, span: 8 },
       { name: '开户证件照', value: 8, span: 8 },
        { name: '开户用证件号', value: 9, span: 8 },
       { name: '开户证件有效期', value: 10, span: 8 },
        { name: '开户预留手机号', value: 11, span: 8 },
        { name: '财务联系人邮箱', value: 14, span: 8 },
        { name: '财务联系人姓名', value: 12, span: 8 },
        { name: '财务联系人手机号', value: 13, span: 8 },
      ],
    };
  },
  methods: {},
  mounted() {
    let qyfs = this.myData.hotelContractQualificationInformationVO.contractMethodType;
    console.log('qyfs',qyfs);
    let jiesuan = this.myData.hotelSettlementReceiptInformationVO.settlementAccountType;
    console.log('jiesuan',jiesuan);
    let yizhi = this.myData.hotelContractQualificationInformationVO.isContractBusinessLicenseSameAsHotel;
    console.log('yizhi',yizhi);
    switch (qyfs) {
      case 1:
        this.aptitude = 1;
        this.mony = 3;
        break;
      case 2:
        this.aptitude = 2;
        if (yizhi == 1) {
          this.same = 1;
          if (jiesuan == 1) {
            this.mony = 1;
          } else if (jiesuan == 2) {
            this.mony = 2;
          }
        } else if (yizhi == 0) {
          this.same = 2;
          if (jiesuan == 2) {
            this.mony = 2;
          } else if (jiesuan == 1) {
            this.mony = 1;
          }
        }
        break;
      case 3:
        this.aptitude = 3;
        if (yizhi == 1) {
          this.same = 1;
          if(jiesuan==1){
            this.mony=3
          }else if(jiesuan==2){
            this.mony=2
          }
        } else if (yizhi == 0) {
          this.same = 2;
          if(jiesuan==1){
            this.mony=3
          }else if(jiesuan==2){
            this.mony=2
          }
        }
        break;
      default:
        break;
    }
    console.log('....', yizhi);
    console.log('qyfs:', qyfs);
    console.log('data', this.myData);
  },
};
</script>
<style lang="less" scoped>
.differentType {
  width: 100%;
  height: 20%;
}
.checkAll {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-content: center;
  .differentType {
    width: 80%;
    margin: 12px auto;
    font-size: 14px;
    display: flex;
    flex-direction: row;
    align-content: center;
    .title {
      width: 15%;
    }
    .checkText {
      width: 85%;
    }
  }
}
:deep .checkText {
  .t-textarea {
    width: 85%;
  }
}
</style>
